package com.ruoyi.pos.domain;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * item对象 _order_item
 * 
 * @author wzh
 * @date 2021-04-19
 */
public class OrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 订单id,参照订单表 */
    @Excel(name = "订单id,参照订单表")
    private Long oid;

    /** 商品id,参照商品表 */
    @Excel(name = "商品id,参照商品表")
    private Long gid;

    /** 购买数量 */
    @Excel(name = "购买数量")
    private Long number;

    /** 售价，可能和标价有所不同 */
    @Excel(name = "售价，可能和标价有所不同")
    private BigDecimal salePrice;

    /** 订单项总额，即订单部分金额 */
    @Excel(name = "订单项总额，即订单部分金额")
    private BigDecimal subTotal;

    private List<Goods> goodsList;

    public List<Goods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<Goods> goodsList) {
        this.goodsList = goodsList;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOid(Long oid) 
    {
        this.oid = oid;
    }

    public Long getOid() 
    {
        return oid;
    }
    public void setGid(Long gid) 
    {
        this.gid = gid;
    }

    public Long getGid() 
    {
        return gid;
    }
    public void setNumber(Long number) 
    {
        this.number = number;
    }

    public Long getNumber() 
    {
        return number;
    }
    public void setSalePrice(BigDecimal salePrice) 
    {
        this.salePrice = salePrice;
    }

    public BigDecimal getSalePrice() 
    {
        return salePrice;
    }
    public void setSubTotal(BigDecimal subTotal) 
    {
        this.subTotal = subTotal;
    }

    public BigDecimal getSubTotal() 
    {
        return subTotal;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("oid", getOid())
                .append("goods", getGoodsList())
                .append("number", getNumber())
                .append("salePrice", getSalePrice())
                .append("subTotal", getSubTotal())
                .toString();
    }
}
